使用 RMarkdown 处理子目录

Working with subdirectories with RMarkdown

我正在编写 Markdown 文档,但我想整理我的文件夹,以便更轻松地存储文档中的所有内容。

我有一些图像想放入文档中,但它们存储在相对于 .RMD 文档的名为 Images 的子文件夹中。

如何设置才能避免出现此错误:

pandoc: Could not fetch New%20file.png
New file.png: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 67
Execution halted

这是我的代码:

---
title: "Markdown Tutorial"
author: "Me"
date: "August 18, 2016"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, fig.path='Images/')
```

# Creating and Setting Your Document

To create your first markdown document, open up RStudio and clic on File > New File > R Markdown... 

![Creating a new Markdow](New file.png)

在你的 Rmarkdown 中输入完整路径:

# Creating and Setting Your Document

To create your first markdown document, open up RStudio and clic on File > New File > R Markdown... 

![Creating a new Markdow](Images/fig1.png)